@import "global";

.index {
    margin: 15px;
    display: block;
    font-size: 18px;
    color: #aaa;
    text-decoration: none;
    position: absolute;
    z-index: 1;
    font-weight: bold;
}
.menu {
    margin: 15px;
    position: absolute;
    font-size: 18px;
    z-index: 1;
    font-weight: bold;
    right: 0;
    .menu-item {
        float: right;
        margin-right: 10px;
        a {
            color: #aaa;
        }
    }
}
a.name {
    color: #444;
}
.main {
    color: #4A4A4A;
    margin: 0 auto;
    max-width: 720px;
    padding: 0 15px;
    min-height:100%;
    position:relative;
    .site {
        .logo {
            margin: 0 auto;
            width: 80px;
            height: 80px;
            border-radius: 80px;
            background-size: cover;
            background-repeat: no-repeat;
            border: 1px #eee solid;
        }
        .title {
            margin: 0;
            margin-top: 30px;
            font-weight: bold;
            font-size: 32px;
            text-align: center;
        }
        .subtitle {
            .font-content;
            font-style: italic;
            margin-top: 10px;
            font-size: 16px;
            color: #bbb;
            text-align: center;
            font-weight: normal;
        }
    }
    &.page {
        padding-top: 100px;
        padding-bottom: 70px;
        .header {
            text-align: center;
            .tag {
                margin: 0;
                margin-top: 30px;
                font-weight: bold;
                font-size: 32px;
            }
            .tag-sub {
                margin: 0;
                font-weight: normal;
                margin-top: 10px;
                font-size: 16px;
                color: #bbb;
            }
        }
        .article-list {
            margin-top: 100px;
            .article {
                margin-bottom: 55px;
                padding-bottom: 45px;
                border-bottom: 1px #ddd dashed;
                &:last-child {
                    border-bottom: 0;
                }
                .title {
                    font-size: 26px;
                    font-weight: bold;
                    margin-bottom: 5px;
                    text-decoration: none;
                    color: #4A4A4A;
                    display: block;
                    .top {
                        color: #ccc;
                        margin-right: 5px;
                    }
                }
                .cover {
                    color: #fff;
                    width: 100%;
                    height: 280px;
                    background-size: cover;
                    background-position: center;
                    background-repeat: no-repeat;
                    border-radius: 6px;
                    border: 1px solid #ddd;
                    box-sizing: border-box;
                    margin-top: 15px;
                    margin-bottom: 10px;
                }
                .preview {
                    .font-content;
                    display: inline-block;
                    letter-spacing: 0.5px;
                    line-height: 28px;
                    font-size: 16px;
                    margin-top: 10px;
                    color: #666;
                }
                .info {
                    margin-top: 15px;
                    margin-bottom: 20px;
                    color: #333;
                    font-size: 14px;
                }
                .avatar {
                    width: 20px;
                    height: 20px;
                    margin-right: 10px;
                    border-radius: 20px;
                    background-size: cover;
                    background-repeat: no-repeat;
                    float: left;
                    margin-top: -4px;
                    border: 1px #eee solid;
                }
                .name {
                    margin-right: 10px;
                }
                .date {
                    color: #ccc;
                }
                .tags {
                    .font-content;
                    margin-left: 10px;
                    float: right;
                    .tag {
                        margin-right: 5px;
                        color: #bbb;
                        text-decoration: none;
                    }
                }
            }
        }
        .page-nav {
            position: relative;
            height: 50px;
            a {
                color: #bbb;
                font-style: italic;
                text-decoration: none;
            }
            .nav {
                left: 0;
                right: 0;
                text-align: center;
                display: block;
                color: #bbb;
                position: absolute;
                z-index: -1;
            }
            .prev {
                float: left;
                &:before {
                    content: "";
                    width: 3px;
                    height: 3px;
                    border: 2px #ccc solid;
                    border-radius: 3px;
                    display: block;
                    float: left;
                    margin-right: 7px;
                    margin-top: 5px;
                }
            }
            .next {
                float: right;
                &:after {
                    content: "";
                    width: 3px;
                    height: 3px;
                    border: 2px #ccc solid;
                    border-radius: 3px;
                    display: block;
                    float: right;
                    margin-left: 7px;
                    margin-top: 5px;
                }
            }
        }
    }
    &.article {
        padding-top: 120px;
        padding-bottom: 120px;
        .title {
            margin: 0;
            font-weight: bold;
            color: #4A4A4A;
            font-size: 30px;
            line-height: 42px;
        }
        .info {
            margin-top: 10px;
            font-size: 14px;
            .avatar {
                width: 20px;
                height: 20px;
                margin-right: 10px;
                border-radius: 20px;
                background-size: cover;
                background-repeat: no-repeat;
                float: left;
                margin-top: -4px;
                border: 1px #eee solid;
            }
            .name {
                margin-right: 5px;
            }
            .date {
                color: #ccc;
                margin-right: 5px;
            }
            .tags {
                .font-content;
                color: #ccc;
                .tag {
                    margin-right: 5px;
                    color: #bbb;
                    text-decoration: none;
                }
            }
        }
        .content {
            .font-content;
            margin-top: 70px;
            font-size: 16px;
            letter-spacing: 1px;
            line-height: 1.7;
            // text-align: justify;
            h1, h2, h3, h4, h5, h6 {
                .font-main;
                // font-weight: normal;
                & + p {
                    margin-top: 10px;
                }
            }
            h1 {
                font-size: 28px;
                margin-top: 40px;
                margin-bottom: 10px;
            }
            h2 {
                font-size: 24px;
                margin-top: 40px;
                margin-bottom: 10px;
            }
            h3 {
                font-size: 18px;
                margin-top: 40px;
                margin-bottom: 10px;
            }
            p {
                margin-bottom: 30px;
                margin-top: 30px;
            }
            a {
                color: #1980e6;
                text-decoration: underline;
                &:hover {
                    color: #0f4d8a;
                    // text-decoration: underline;
                }
            }
            code {
                .font-code;
                font-size: 14px;
                padding: 1px 4px;
                border-radius: 2px;
                margin: 0px 3px;
                border: 1px dashed #EDD0BD;
                background-color: #FFF9F5;
            }
            pre {
                margin: 0;
                code {
                    .font-code;
                    font-size: 14px;
                    margin: 0;
                    padding: 15px;
                    border-radius: 0;
                    border: 1px dashed #EDD0BD;
                    background-color: #FFF9F5;
                }
            }
            blockquote {
                border-left: 3px #6b6b6b solid;
                padding: 0px 10px 0px 20px;
                margin: 25px 0;
                margin-left: -23px;
            }
            table {
                font-size: 14px;
                width: 100%;
                border-width: 1px;
                border-color: #ddd;
                border-collapse: collapse;
                th {
                    border-width: 1px;
                    padding: 5px;
                    border-style: solid;
                    border-color: #ddd;
                    background-color: #eee;
                }
                td {
                    border-width: 1px;
                    padding: 5px;
                    border-style: solid;
                    border-color: #ddd;
                    background-color: #fff;
                }
            }
            ul {
                list-style: circle;
                padding-left: 40px;
                li {
                    margin: 5px 0;
                }
            }
            ol {
                padding-left: 40px;
                li {
                    margin: 5px 0;
                }
            }
            hr {
                margin: 25px 0;
                border: 0;
                border-top: 1px dashed #ccc;
            }
            img {
                margin: 30px auto;
                max-width: 100%;
                border: 1px solid #eee;
                display: block;
                opacity: 0.2;
                transition: opacity .3s ease-in;
                cursor: pointer;
            }
            .image-alt {
                text-align: center;
                color: #aaa;
                font-style: italic;
                margin-top: -10px;
                margin-bottom: 50px;
            }
        }
        .recommend {
            margin-top: 50px;
            overflow: auto;
            .nav {
                width: 100%;
                .head {
                    font-size: 12px;
                    font-style: italic;
                    margin-bottom: 10px;
                    color: #c4c4c4;
                    text-align: center;
                }
                .link {
                    color: #4A4A4A;
                    text-align: center;
                    display: block;
                }
                &.prev.more {
                    width: 45%;
                    text-align: left;
                    float: left;
                    .head, .link  {
                        text-align: left;
                    }
                }
                &.next.more {
                    width: 45%;
                    text-align: right;
                    float: right;
                    .head, .link {
                        text-align: right;
                    }
                }
            }
        }
        .author {
            margin-top: 36px;
            padding-top: 40px;
            text-align: center;
            .avatar {
                margin: 0 auto;
                width: 70px;
                height: 70px;
                border-radius: 70px;
                background-size: cover;
                background-repeat: no-repeat;
                border: 20px #fff solid;
                &:before {
                    border-top: 1px #ccc dashed;
                    content: "";
                    width: 100%;
                    position: absolute;
                    left: 0;
                    right: 0;
                    margin-top: 36px;
                    z-index: -1;
                }
            }
            .name {
                margin-top: 20px;
                font-weight: bold;
                font-size: 16px;
            }
            .intro {
                .font-content;
                font-style: italic;
                margin-top: 8px;
                font-size: 14px;
                color: #bbb;
            }
        }
        #disqus_thread {
            margin-top: 50px;
        }
    }
    &.about {
        .content {
            margin-top: 80px;
            text-align: center;
        }
    }
    &.archive, &.tag {
        padding-top: 100px;
        padding-bottom: 100px;
        a {
            color: #000;
        }
        .site {
            .title, .subtitle {
                text-align: left;
                .font-content;
            }
        }
        .header {
            padding-top: 60px;
            .title {
                margin-top: 30px;
                font-weight: bold;
                background-color: black;
                color: white;
                padding: 3px 5px;
                // font-size: 32px;
            }
            .subtitle {
                margin-top: 10px;
                padding: 3px 5px;
                .font-content;
                font-style: italic;
                color: #bbb;
            }
        }
        .archive-list {
            margin-top: 50px;
            .archive-item {
                margin: 40px 0;
                .archive-year {
                    font-size: 18px;
                    margin: 15px 0;
                    font-weight: bold;
                }
                .article-list {
                    .article-item {
                        margin-bottom: 10px;
                        .date {
                            color: #aaa;
                            margin-right: 20px;
                        }
                    }
                }
            }
        }
        .tag-list {
            margin-top: 50px;
            .tag-item {
                margin: 40px 0;
                .tag-name {
                    font-size: 18px;
                    margin: 15px 0;
                    font-weight: bold;
                }
                .article-list {
                    .article-item {
                        margin-bottom: 10px;
                        .date {
                            color: #aaa;
                            margin-right: 20px;
                        }
                    }
                }
            }
        }
    }
}
.container {
    height: auto;
    min-height: 100%;
    padding-bottom: 0;
}
.footer {
    width: 100%;
    font-size: 14px;
    border-top: 1px #eee solid;
    color: #bbb;
    background-color: #fff;
    clear: both;
    position: relative;
    height: 32px;
    margin-top: -33px;
    span {
        padding: 8px 15px;
        display: block;
        a {
            font-weight: bold;
        }
    }
    .copyright {
        float: left;
    }
    .publish {
        float: right;
        a {
            color: #bbb;
            text-decoration: none;
        }
    }
}
